
if (islogin()) {
    $('#btn_add').click(function () {
        var fd=new FormData($('#add_private_form')[0]);
        $.post({
            url:'../../requests/teacher/add_private.php',
            data:fd,
            processData: false,
            contentType: false,
            success:function (data) {
                if (data == '1') {
                    $$.alert("添加成功！",function () {

                    })
                }
                else if (data == '0') {
                    $$.alert("添加失败！",function () {

                    });
                }
                else if (data == 'file_exist') {
                    $$.alert("文件名已存在！")
                }
            }
        });
    });
}
else window.location.href='../../index.html';